package io;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class ReadAndWriteWAVFile {
	public static void main(String args[]){
		File wavin = new File("file/audio-in.mp3");
		File wavout = new File("file/audio-out.mp3");
		try {
			FileInputStream fin = new FileInputStream(wavin);
			FileOutputStream fout = new FileOutputStream(wavout);
			int c;
			while((c=fin.read())!= -1 ){
				fout.write(c);
			}
			fin.close();
			fout.close();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
